package com.example.demo.dao;

import com.example.demo.pojo.Classed;
import com.example.demo.pojo.WorkUser;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.QueryByExampleExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
@Mapper
public interface DaoUser extends JpaRepository<WorkUser,String>, QueryByExampleExecutor<WorkUser> {
    List<WorkUser> findAllByIdOrEmail(String id, String email);
    Page<WorkUser> findByTypeAndNameContainingOrPetNameContainingOrSexContaining(String Type, String name , String petName, String sex,Pageable pageable);
    int countByTypeAndNameContainingOrPetNameContainingOrSexContaining(String Type,String name , String petName, String sex);
    WorkUser findByEmail(String s);
    int countByEmail(String  s);
}
